﻿
    using Chain.BLL;
    using Chain.Model;
    using Chain.Wechat;
    using System;
    using System.Text.RegularExpressions;
    using System.Web.UI;
    using System.Web.UI.HtmlControls;

    public partial class membershipcard : Page
    {

        private Chain.BLL.Mem MemIBll = new Chain.BLL.Mem();

        protected void Page_Load(object sender, EventArgs e)
        {
            if ((base.Request.Cookies["uid"] != null) && Regex.IsMatch(base.Request.Cookies["uid"].Value, @"^\d+$"))
            {
                int MemID = Convert.ToInt32(base.Request.Cookies["uid"].Value);
                Chain.Model.Mem MemModel = this.MemIBll.GetModel(MemID);
                new BusinessLogic().DrawImage(MemModel);
                this.imgMemCard.Src = string.Concat(new object[] { "../Upload/WeiXin/Images/", MemModel.MemCard, "-MemCard.jpg?rd=", new Random().Next(0x1869f) });
            }
        }
    }


